# -*- coding: utf-8 -*-
"""
作者: 肖麒
联系方式：QQ：1505448035
时间: 2025/4/24 15:34
文件作用：
"""
from curl_cffi import requests
import json


class SubmitApi:
    def __init__(self):
        pass

    def get_submit(self):
        headers = {
            # "Host": "lv-pc-api-sinfonlinea.ulikecam.com",
            # "app-sdk-version": "48.0.0",
            # "content-type": "application/json",
            # "appid": "3704",
            # "appvr": "8.6.0",
            # "device-time": "1755324249",
            # "lan": "zh-hans",
            # "loc": "cn",
            # "pf": "4",
            # "sign": "bf4488ea44b8e7c8cf70e7a7480126f0",
            # "sign-ver": "1",
            # "tdid": "4012556021711092",
            # "x-ss-stub": "a63d7728e970771ca4628b66a43c7377",
            # "x-ss-dp": "3704",
            # "x-tt-trace-id": "00-b17a78fe0de41660050c0f449a1f0e78-b17a78fe0de4166001",
            # "user-agent": "Cronet/TTNetVersion:fc5bce71 2024-12-31 QuicVersion:55af8b7a 2024-11-18",
            # "x-helios": "9mcAABcUIhBcJUWQdkc2fMn8ueZvUWgXQWWjDD94f3DSpSaO",
            # "x-medusa": "fB+gaIj3/5KoyHxTqTVoGCjQwXBYVwMBkri0CyAAEYkwmU9Avlyf9R2F8SAQL+mQJ4e5KunatHINWPseO/j9kbnXJKs76IkR15Jg66Mk+kueSn2yXS/pzZKPuP4YYq8bp23cn14HdabFsZmz8eLxpPIaPKK7/jRCaecibvWTEo4q2i1JbpKJZLq8cNG3QkqnAutMGJF+4G0WEoR7Uo7A9kR3o62m6R6PkQtfKOBiDVxdKqRbspdWdajSdCFeCkqo777QyJZUxswyu7XCjal9h0zSATVSxtDg4KrI1pP/WRpviuXBW6w+duiMKgGrjalY6UnG9Nva10kL5+L5wZD11WRJY008gUiXy7bi3tdzbB+Ri4y+T5tD5umHWaWE1gJBgE8YopJOMa4lpzpFE2uEEXaIWsic8O50TUfk6RLcUKko7MBItc57seqAyTbSaJkkg7vUj4+XfkBh1i174IyCneLbJ+8wH8NURh+fprfRM8LPSmedI5jyw+XKLdGVcQ552pUAAKTV64MlFZmeQj/CaOh6LKowyNVyGVNvoypkGK8bHpk9Llj6H7RsJXgdubO+bamomjz1ZuWGSHw8bS40Le3PoJMxU2O7CbbED9VG9M9lUfdeJKPAt5XyjmiNlb49sVobLL7br19kzeARg4+T6PrUUOebCVN2YtpKAhvMFL1UMKjUeblDl3Ti2NzWaMDN5yjMuv7vbPjt3cQXHsc77Ex0N9luvEGvxq6A0P4u6F2zZslfz/uZL9xosPmxJmhSMyJSjg8xCS9h+0/5Wy0pW78cH/Xb96YGxe2Zhu+uDghfHauZanr9Rj7Lv6fL32hESt2op6WH2e82HtC6T2dlCeSjnGqVkBcgHmX7////7/f//wAA"
        }
        url = "https://lv-pc-api-sinfonlinea.ulikecam.com/lv/v1/audio_subtitle/submit"
        params = {
            # "device_brand": "American Megatrends International, LLC.",
            # "device_id": "4012556021711092",
            # "iid": "3045002399793178",
            # "aid": "3704",
            # "region": "CN",
            # "device_platform": "windows",
            # "babi_param": "{\"feature_entrance\":\"editor\",\"feature_entrance_detail\":\"editor-elements-captions-subtitle_recognition\",\"feature_key\":\"subtitle_recognition\",\"scenario\":\"video_editor\"}",
            # "app_name": "JianyingPro",
            # "device_type": "",
            # "channel": "jianyingpro_0",
            # "os_version": "10.0.26100",
            # "version_code": "8.6.0",
            # "version_name": "8.6.0"
        }
        data = {
            "adjust_endtime": 200,
            #
            "audio": "v03a2dg10004d2g1ucnog65gkv98t1vg",
            "audio_type": "vid",
            "caption_type": 0,
            # "client_request_id": "a4dfd1d6-ff1f-467d-91b8-2e9a0d63e94b",
            "enable_cache": True,
            "enter_from": "asr",
            "local_keyword_list": [],
            "max_lines": 1,
            # "md5": "0d9f569410cd6c97bd2aff7ce041aab4",
            "songs_info": [
                {
                    "end_time": 121333.334,
                    "id": "",
                    "start_time": 0
                }
            ],
            "use_big_asr": False,
            "use_feedback_pairs": False,
            "use_local_keyword": True,
            "words_per_line": 16
        }
        data = json.dumps(data, separators=(',', ':'))
        response = requests.post(url, headers=headers, params=params, data=data)

        json_data = response.json()
        return json_data


if __name__ == '__main__':
    submit_api = SubmitApi()
    json_data = submit_api.get_submit()
    data = json_data.get('data')
    print(data)
